<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加用户</title>
</head>
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.js"></script>
<script type="text/javascript">
    $(function () {
            //请求token
            $.ajax({
                url:"/formToken/get.json?operation=addSysUserAOP",
                dataType :"text",
                type : 'GET',
                async:true,
                success : function(data) {
                    $("#token").val(data);
                },
                error : function(data){
                    alert("b");
                    console.log(data);
                }
            });
    });
    function checkit() {
        $.ajax({
            url:"/sysUserController/addSysUserAOP.json",
            dataType :"json",
            data : $("#tokenForm").serialize(),
            type : 'POST',
            async:true,
            success : function(data) {
                alert(data.sysUserId);
                //alert($.parseJSON(data));
            }
        });
    }
</script>
<body>
<form id="tokenForm" name="teacForm">
    Token:<br>
    <input id="token" name="token" value="" />
    <br>
    Login name:<br>
    <input type="text" name="sysUserLoginName">
    <br>
    Real name:<br>
    <input type="text" name="sysUserRealName">
    <input type="button" value="提交" name="Submit" onclick="checkit()">
</form>
</body>
</html>